package org.sbbs.base.searcher;

/*
 * TODO 完善此枚举类型
 */
public enum SearchOperator {
	eq("eq", "equal"), ne("ne", "not equal"), lt("lt", "less"), le("le",
			"less or equal"), gt("gt", "greater"), ge("ge", "greater or equal"),

	in("in", "is in"), ni("ni", "is not in"),

	bw("bw", "begins with"), bn("bn", "does not begin with"), ew("ew",
			"ends with"), en("en", "does not end with"), cn("cn", "contains"), nc(
			"nc", "does not contain"), like("cn", "contains");

	SearchOperator(String opr, String discription) {
		this.opr = opr;
		this.discription = discription;
	}

	/**
	 * ['eq', 'ne', 'lt', 'le', 'gt', 'ge', 'bw', 'bn', 'in', 'ni', 'ew',
	 * 'en', 'cn', 'nc'] ['equal','not equal', 'less', 'less or
	 * equal','greater','greater or equal', 'begins with','does not begin
	 * with','is in','is not in','ends with','does not end
	 * with','contains','does not contain']
	 * 
	 * 
	 * 
	 * 关系操作符 < 小于操作符 <= 小于或等于操作符 > 大于操作符 >= 大于或等于操作符 = 等于操作符 != 不等于操作符 <>
	 * 不等于操作符 := 赋值操作符
	 * 
	 * 比较操作符
	 * 
	 * IS NULL 如果操作数为NULL返回TRUE LIKE 比较字符串值 BETWEEN 验证值是否在范围之内 IN
	 * 验证操作数在设定的一系列值中
	 * 
	 * 逻辑操作符
	 * 
	 * AND 两个条件都必须满足 OR 只要满足两个条件中的一个 NOT 取反
	 * 
	 * ['eq', 'ne', 'lt', 'le', 'gt', 'ge', 'bw', 'bn', 'in', 'ni', 'ew',
	 * 'en','cn', 'nc']
	 * 
	 */
	// private String name;
	private String opr;
	private String discription;

	public String getOpr() {
		return opr;
	}

	public void setOpr(String opr) {
		this.opr = opr;
	}

	public String getDiscription() {
		return discription;
	}

	public void setDiscription(String discription) {
		this.discription = discription;
	}

	public static SearchOperator getByName() {

		return null;
	}

}
